package com.pur.zsms.supplier.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.documentsmanage.vo.DomVo;
import com.pur.zsms.matermanage.mater.po.MaterLevelPo;
import com.pur.zsms.matermanage.mater.vo.MaterVo;
import com.pur.zsms.matermanage.mater.vo.MaterVoForCostSupplier;
import com.pur.zsms.ordercustommanage.po.OrderSupplierMaterPo;
import com.pur.zsms.po.SupplierShopPo;
import com.pur.zsms.supplier.po.ShopSupplierTypePo;
import com.pur.zsms.supplier.po.SupplierDistributePo;
import com.pur.zsms.supplier.po.SupplierPo;
import com.pur.zsms.supplier.po.SupplierQualificationPo;
import com.pur.zsms.supplier.po.SupplierUserPo;
import com.pur.zsms.supplier.vo.ShopSupplierTypeVo;
import com.pur.zsms.supplier.vo.ShopSupplierVo;
import com.pur.zsms.supplier.vo.SupplierDistributeVo;
import com.pur.zsms.supplier.vo.SupplierOrderCustVo;
import com.pur.zsms.supplier.vo.SupplierQualificationVo;
import com.pur.zsms.supplier.vo.SupplierUserVo;
import com.pur.zsms.supplier.vo.SupplierVo;
import com.pur.zsms.systemsetting.datadictionary.po.Code;
import com.pur.zsms.systemsetting.datadictionary.vo.CodeVo;
import com.pur.zsms.vo.SupplierShopVo;

public interface ISupplierService {

	String msg = "";

	public String getMsg();

	public void setMsg(String msg);

	/**
	 * 查询供应商集合
	 * 
	 * @param pageController
	 * @param SupplierVo
	 * @return
	 * @throws GenericException
	 */
	public PaginationSupport listSupplier(PageController pageController, SupplierVo supplierVo) throws GenericException;

	public PaginationSupport listSupplierCost(PageController pageController, MaterVoForCostSupplier tMaterVo) throws GenericException;

	public PaginationSupport listSupplier(PageController pageController, MaterVo tMaterVo) throws GenericException;

	public PaginationSupport findCustForOrder(PageController pageController, SupplierOrderCustVo supplierOrderCustVo) throws GenericException;

	public PaginationSupport findSupDistribute(PageController pageController, SupplierDistributeVo supplierDistributeVo) throws GenericException;

	public PaginationSupport findSupplierQualification(PageController pageController, SupplierQualificationVo supplierQualificationVo)
			throws GenericException;

	/**
	 * 供应商客户关系查询
	 */
	public PaginationSupport listSupCus(PageController pageController, ShopSupplierVo suppCusVo) throws GenericException;

	/**
	 * 新增供应商信息
	 */
	public boolean addSupplier(SupplierVo supplierVo) throws GenericException;

	public boolean addSupplierDistribute(SupplierDistributeVo supplierDistributeVo) throws GenericException;

	/**
	 * 修改供应商信息
	 */
	public void updateUser(SupplierPo supplierPo) throws GenericException;

	/**
	 * 删除供应商信息
	 */
	public void deleteUser(int supplierId) throws GenericException;

	public void deleteSupplierDistribute(long disId, int supId, String disDate) throws GenericException;

	public void deleteShopSupplier(int userId, int supId) throws GenericException;

	public String getAllSupPoJsonString(int space) throws GenericException;

	public String getAllSup() throws GenericException;

	public String getSupByMaterType(int materType) throws GenericException;

	public String getAlgetSupByMaterTypelSup() throws GenericException;

	public List<MaterLevelPo> getMaterLevelPoByMaterIdSupId(int materId, int supId) throws GenericException;

	public String getAllShopPoJsonString(int space) throws GenericException;

	public String getStoreCustUserPoJsonString(int space) throws GenericException;

	public int getSupIdByUserId(long userId) throws GenericException;

	public int getSupStoreHouseIdByUserId(long userId) throws GenericException;

	public String getSupNameByUserId(long userId) throws GenericException;

	public SupplierPo getSupPoByUserId(long userId) throws GenericException;

	public List<SupplierUserPo> getSupplierUserPo(SupplierUserVo c) throws GenericException;

	public List<SupplierShopPo> getSupplierShopPo(SupplierShopVo c) throws GenericException;

	public SupplierVo getSupVoBySupId(String supId) throws GenericException;

	public SupplierPo getSupPoBySupId(int supId) throws GenericException;

	public List<SupplierPo> getSupPoAll() throws GenericException;

	public boolean addSupplierCust(ShopSupplierVo c, Long[] suptypes) throws GenericException;

	public boolean updateShopSupplier(ShopSupplierVo c, Long[] suptypes) throws GenericException;

	public String updateSupplier(SupplierVo c) throws GenericException;

	public List<Object[]> getAllTotalByDate(String date, int supId, int custId, String custIdAll, String orderBy) throws GenericException;

	public List<Object[]> getAllTotalByDate(String date, int supId, String custIdAll, String orderBy) throws GenericException;

	public List<Object[]> getAllTotalByDate(String date, int supId) throws GenericException;

	public List<Object[]> getCustQuotationDate(int supId) throws GenericException;

	public List<Object[]> getAllTotalByUserIdALl(String date, int supId, String userIdAll) throws GenericException;

	public List<Object[]> getSupDistributeSummarySheet(String date, int supId, String materType, int storeHouseId, String shopIdAll)
			throws GenericException;

	public List<Object[]> getSupDistributeSummarySheetForGroupbyMaterType(String date, int supId) throws GenericException;

	public List<Object[]> getSupDistributeSummarySheetForMaterOrder(String date, int supId, int materId, int storeHouseId, String shopIdAll)
			throws GenericException;

	public List<Object> getSupDistributeSummarySheetLeaveMessageForMaterOrder(String date, int supId, int materId, String shopIdAll)
			throws GenericException;

	public List<Object[]> getSupDistributLeaveMessage(String date, int supId) throws GenericException;

	public List<Object[]> getExcelCust(String date, int supId) throws GenericException;

	public List<Object[]> getExcelCust(String date, int supId, String custIdAll) throws GenericException;

	public List<Object[]> getExcelCustForDistribute(String userIdAll) throws GenericException;

	public List<Object[]> getExcelCustAllRealMaterByDate(String date, int supId, String custId) throws GenericException;

	public List<Object[]> getExcelCustAllRealMaterByDateForPrint(String date, int supId, String custId) throws GenericException;

	public List<Object[]> getExcelCustAllRealMaterByDateForPrintCost(String date, int supId, String custId) throws GenericException;

	public List<Object[]> getExcelCustTotalRealMaterByDateMaterIdMaterLevel(String date, int supId, String custId, String materId, String materLevel)
			throws GenericException;

	public List<Code> listAllSuptype() throws GenericException;

	public List<CodeVo> listAllSuptypeByUpdate(int userId, int supId) throws GenericException;

	public boolean importSupMaterValue(Map<Integer, String> map, String custIdAll) throws Exception;

	public boolean importSupMaterValueCost(Map<Integer, String> map) throws Exception;

	public boolean importSupMaterValueCostForWeb(MaterVo materVo) throws Exception;

	public boolean importSupMaterValueCostForOnlyCost(MaterVo materVo) throws Exception;

	public boolean importSupMaterValueForWeb(MaterVo materVo) throws Exception;

	public void computeTotalValue(String materDay, int supId, int ordId) throws Exception;

	public boolean importSupMaterRealityWeight(List<Map<Integer, String>> list, String materDay, int supId) throws Exception;

	public boolean importSupMaterRealityWeightForWeb(MaterVo materVo) throws Exception;

	public boolean importSupMaterWeightForWeb(MaterVo materVo) throws Exception;

	public boolean updateSupMaterWeightForBatch(MaterVo materVo) throws Exception;

	public List<Object[]> getUserIdDistributePoList(String ordDate, int supId) throws GenericException;

	public boolean checkSupplierQualificationName(SupplierQualificationVo supplierQualificationVo) throws GenericException;

	public void addSupplierQualificationPo(SupplierQualificationVo supplierQualificationVo) throws GenericException;

	public SupplierQualificationPo getSupplierQualificationPoByQid(int qid) throws GenericException;

	public boolean deleteSupplierQualification(int qid) throws GenericException;

	public BigDecimal getMaterValueCostByMaterId(int materId, int supId) throws GenericException;

	public BigDecimal getMaterValueRealByMaterId(int materId, BigDecimal materValueCost, int supId, long shopId) throws GenericException;

	public BigDecimal getMaterValueRealLastByMaterId(int materId, int supId, long shopId) throws GenericException;

	public BigDecimal getMaterValueRealByMaterIdForLook(int materId, int supId, long shopId) throws GenericException;

	public ShopSupplierTypePo getShopSupplierTypePo(ShopSupplierTypeVo vo) throws GenericException;
}
